<?xml version="1.0" encoding="utf-8"?>
<lcfg:config
	xmlns:lcfg="http://schemas.icitadel.com/Lazarus/Config.xsd"
	title="Data Tier Generation"
	folder="output"
	compiledoutput="compiled.xml"
	manifestoutput="manifest.xml">
  <lcfg:engine-templates>
    <lcfg:class-reference name="Source" assembly="OR.Lazarus.Library" class="OR.Lazarus.Library.DataTier.Source.ProjectDetail" />
    <lcfg:class-reference name="Compiled" assembly="OR.Lazarus.Library" class="OR.Lazarus.Library.DataTier.Compiled.ProjectDetail" />
    <lcfg:class-reference name="Validator" assembly="OR.Lazarus.Library" class="OR.Lazarus.Library.DataTier.SourceValidator" />
    <lcfg:class-reference name="Compiler" assembly="OR.Lazarus.Library" class="OR.Lazarus.Library.DataTier.SourceCompiler" />
    <lcfg:class-reference name="Generator" assembly="OR.Lazarus.Library" class="OR.Lazarus.Library.DataTier.SourceGenerator" />
  </lcfg:engine-templates>
  <lcfg:tiers>
    <lcfg:tier type="Database" folder="Database">
      <lcfg:transforms library="DotNet35-SQL2k5\Database">
        <lcfg:transform type="compiled" source="crebas.xsl" output="crebas.cmd" />
        <lcfg:transform type="compiled" source="clearbas.xsl" output="clearbas.cmd" />

        <lcfg:transform type="compiled" source="table-create.xsl" output="TableCreate.sql" />
        <lcfg:transform type="compiled" source="table-drop.xsl" output="TableDrop.sql" />

        <lcfg:transform type="compiled" source="index-create.xsl" output="IndexCreate.sql" />
        <lcfg:transform type="compiled" source="index-drop.xsl" output="IndexDrop.sql" />

        <lcfg:transform type="compiled" source="reference-create.xsl" output="ReferenceCreate.sql" />
        <lcfg:transform type="compiled" source="reference-drop.xsl" output="ReferenceDrop.sql" />

        <lcfg:transform type="compiled" source="constraint-create.xsl" output="ConstraintCreate.sql" />
        <lcfg:transform type="compiled" source="statistic-update.xsl" output="StatisticsUpdate.sql" />

        <lcfg:transform type="compiled" source="dbsecurity.xsl" output="Security.sql" />
        <lcfg:transform type="compiled" source="grants.xsl" output="Grants.sql" />

        <lcfg:transform type="compiled" source="droptabledata.xsl" output="DropTableData.sql" />
        <lcfg:transform type="compiled" source="initial-data.xsl" output="InitialData.sql" output-type="Database.InitialData" />

        <lcfg:transform type="compiled" source="dbproc-create.xsl" output="CreateProcs.sql" folder="Procedures" output-type="Database.StoredProcedure.Create" />
        <lcfg:transform type="compiled" source="dbproc-alter.xsl" output="sql" prefix="sp" folder="Procedures" filter="//lzc:method" output-type="Database.StoredProcedure.Alter" overwrite="Regions" />
        <lcfg:transform type="compiled" source="dbproc-drop.xsl" output="DropProcs.sql" folder="Procedures" output-type="Database.StoredProcedure.Drop" />

        <lcfg:transform type="manifest" source="procedure-alter-integrated.xsl" output="AlterProcs-Integrated.cmd" folder="Procedures" />
        <lcfg:transform type="manifest" source="procedure-alter-sql.xsl" output="AlterProcs-SQL.cmd" folder="Procedures" />
      </lcfg:transforms>
    </lcfg:tier>
    <lcfg:tier type="Data Access" folder="DataAccess">
      <lcfg:transforms library="DotNet35-SQL2k5\DataAccess">
        <lcfg:transform type="compiled" source="Schema.xsl" output="xsd" folder="Schemas" filter="//lzc:method[ count( .//lzc:method-result ) &gt; 0 ]" />
        <lcfg:transform type="compiled" source="DDataEntity.xsl" output="cs" folder="Generated" filter="//lzc:table" />
        <lcfg:transform type="compiled" source="DDataEntity.Derived.xsl" output="cs" filter="//lzc:table" />
      </lcfg:transforms>
    </lcfg:tier>
    <lcfg:tier type="Entities" folder="Business.Entities">
      <lcfg:transforms library="DotNet35-SQL2k5\Business.Entities">
        <lcfg:transform type="compiled" source="DataManager.xsl" suffix="DataManager" output="cs" filter="//lzc:project" folder="Generated" output-type="Business.Entity.Manager" />
        <lcfg:transform type="compiled" source="DataManager.Derived.xsl" suffix="DataManager" output="cs" filter="//lzc:project" output-type="Business.Entity.Manager" />

        <lcfg:transform type="compiled" source="Detail.xsl" output="cs" folder="Generated" filter="//lzc:object[ not( @type = 'intersection' ) ]" output-type="Business.Entity.Detail" />
        <lcfg:transform type="compiled" source="Detail.Derived.xsl" output="cs" filter="//lzc:object[ not( @type = 'intersection' ) ]" output-type="Business.Entity.Detail" />

        <lcfg:transform type="compiled" source="Collection.xsl" suffix="Collection" output="cs" folder="Generated" filter="//lzc:object[ not( @type = 'intersection' ) ]" output-type="Business.Entity.Collection" />
        <lcfg:transform type="compiled" source="Collection.Derived.xsl" suffix="Collection" output="cs" filter="//lzc:object[ not( @type = 'intersection' ) ]" output-type="Business.Entity.Collection" />
      </lcfg:transforms>
    </lcfg:tier>
  </lcfg:tiers>
</lcfg:config>

